package com.he.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.he.entity.Areas;
import com.he.service.AreasService;
import com.he.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 小赫
 * <p>2025/7/29 15:30
 */
@RestController
@RequestMapping("areas")
@Api(tags = "区域信息")
public class AreasController {
//    @Resource
//    private AreasService areasService;
//
//    @GetMapping( "/provinces" )
//    @ApiOperation("获取所有省份")
//    public R<List<Areas>> getProvinces ( ) {
//        return R.ok( areasService.getProvinces() );
//    }
//
////    GET /areas/cities/{provinceId} - 获取指定省份下的城市
//    @GetMapping( "/cities/{provinceId}" )
//    @ApiOperation("获取指定省份下的城市")
//    public R<List<Areas>> getCities (@PathVariable(value = "provinceId", required = true) Integer provinceId ) {
//        return R.ok( areasService.getCities(provinceId));
//    }
//
////    GET /areas/code/{code} - 根据编码获取区域信息
//    @GetMapping( "/code/{code}" )
//    @ApiOperation("根据编码获取区域信息")
//    public R<Areas> getByCode (@PathVariable(value = "code", required = true) String code ) {
//        return R.ok( areasService.getByCode( code));
//    }
}
